package com.zhike.service.serviceimpl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zhike.mapper.SpareGoldMapper;
import com.zhike.model.SpareGold;
import com.zhike.service.SpareGoldService;
import com.zhike.util.DataSourceEnum;
import com.zhike.util.DataSourceHolder;
import com.zhike.util.JsonUtil;

@Service
public class SpareGoldServiceImpl implements SpareGoldService {
	
	@Resource
	SpareGoldMapper spareGoldMapper;

	@Override
	public String spareGoldApply(SpareGold spareGold) {
		DataSourceHolder.setDataSources(DataSourceEnum.DS1.getKey());
		spareGoldMapper.spareGoldApply(spareGold);
		return JsonUtil.blank(true, 200, "调用接口成功");
	}

}
